﻿<Activity mc:Ignorable="sads sap sap2010" x:Class="TfsBuild.Process" this:Process.LabWorkflowParameters="[New HybridLab.Workflow.Activities.HybridLabWorkflowDetails()]" this:Process.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:Process.BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" this:Process.SupportedReasons="Manual, BatchedCI, Schedule, ScheduleForced" this:Process.TimeoutForDeploymentScriptInMinutes="30"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:hwa="clr-namespace:HybridLab.Workflow.Activities;assembly=HybridLab.Workflow.Activities"
 xmlns:hwac="clr-namespace:HybridLab.Workflow.Activities.CustomActivities;assembly=HybridLab.Workflow.Activities"
 xmlns:hwac1="clr-namespace:HybridLab.Workflow.Activities.CodeActivities;assembly=HybridLab.Workflow.Activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common"
 xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"
 xmlns:mtbc1="clr-namespace:Microsoft.TeamFoundation.Build.Common;assembly=Microsoft.TeamFoundation.Build.Common"
 xmlns:mtbp="clr-namespace:Microsoft.TeamFoundation.Build.ProcessComponents;assembly=Microsoft.TeamFoundation.Build.ProcessComponents"
 xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbws="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Services;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtlc="clr-namespace:Microsoft.TeamFoundation.Lab.Client;assembly=Microsoft.TeamFoundation.Lab.Client"
 xmlns:mtltc="clr-namespace:Microsoft.TeamFoundation.Lab.TestIntegration.Client;assembly=Microsoft.TeamFoundation.Lab.TestIntegration.Client"
 xmlns:mtlwa="clr-namespace:Microsoft.TeamFoundation.Lab.Workflow.Activities;assembly=Microsoft.TeamFoundation.Lab.Workflow.Activities"
 xmlns:mtlwc="clr-namespace:Microsoft.TeamFoundation.Lab.WorkflowIntegration.Client;assembly=Microsoft.TeamFoundation.Lab.WorkflowIntegration.Client"
 xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration"
 xmlns:mttc="clr-namespace:Microsoft.TeamFoundation.TestManagement.Client;assembly=Microsoft.TeamFoundation.TestManagement.Client"
 xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:s1="clr-namespace:System;assembly=System"
 xmlns:s2="clr-namespace:System;assembly=System.Core"
 xmlns:s3="clr-namespace:System;assembly=System.ServiceModel"
 xmlns:s4="clr-namespace:System;assembly=System.ComponentModel.Composition"
 xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
 xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
 xmlns:this="clr-namespace:TfsBuild"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
    <x:Property Name="LabWorkflowParameters" Type="InArgument(hwa:HybridLabWorkflowDetails)" />
    <x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
    <x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
    <x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
    <x:Property Name="TimeoutForDeploymentScriptInMinutes" Type="InArgument(x:Int32)">
      <x:Property.Attributes>
        <RequiredArgumentAttribute />
      </x:Property.Attributes>
    </x:Property>
    <x:Property Name="resetScripts" Type="InArgument(mtlwa:ScriptDetails[])" />
  </x:Members>
  <this:Process.Metadata>
    <mtbw:ProcessParameterMetadataCollection>
      <mtbw:ProcessParameterMetadata BrowsableWhen="Always" Category="Misc" DisplayName="Timeout For Each Deployment Script (in Minutes)" ParameterName="TimeoutForDeploymentScriptInMinutes" />
    </mtbw:ProcessParameterMetadataCollection>
  </this:Process.Metadata>
  <mva:VisualBasic.Settings>
    <x:Null />
  </mva:VisualBasic.Settings>
  <sap2010:WorkflowViewState.IdRef>TfsBuild.Process_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System.Activities</x:String>
      <x:String>System.Activities.XamlIntegration</x:String>
      <x:String>System.Activities.Statements</x:String>
      <x:String>System.Activities.Expressions</x:String>
      <x:String>System.Activities.Validation</x:String>
      <x:String>HybridLab.Workflow.Activities</x:String>
      <x:String>Microsoft.TeamFoundation</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Client</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Common</x:String>
      <x:String>Microsoft.TeamFoundation.Build.ProcessComponents</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Workflow</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Workflow.Activities</x:String>
      <x:String>Microsoft.TeamFoundation.Build.Workflow.Services</x:String>
      <x:String>Microsoft.TeamFoundation.Lab.Client</x:String>
      <x:String>Microsoft.TeamFoundation.Lab.TestIntegration.Client</x:String>
      <x:String>Microsoft.TeamFoundation.Lab.Workflow.Activities</x:String>
      <x:String>Microsoft.TeamFoundation.Lab.WorkflowIntegration.Client</x:String>
      <x:String>Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities</x:String>
      <x:String>Microsoft.TeamFoundation.TestManagement.Client</x:String>
      <x:String>Microsoft.TeamFoundation.VersionControl.Client</x:String>
      <x:String>Microsoft.VisualBasic.Activities</x:String>
      <x:String>System</x:String>
      <x:String>System.Activities.Debugger</x:String>
      <x:String>System.Activities.Debugger.Symbol</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Windows.Markup</x:String>
      <x:String>TfsBuild</x:String>
      <x:String>HybridLab.Workflow.Activities.Info</x:String>
      <x:String>Microsoft.VisualBasic.CompilerServices</x:String>
      <x:String>System.IO</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>HybridLab.Workflow.Activities</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Common</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Build.Client</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Build.Common</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Build.ProcessComponents</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Build.Workflow</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Lab.Client</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Lab.TestIntegration.Client</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Lab.Workflow.Activities</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.Lab.WorkflowIntegration.Client</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.TestImpact.BuildIntegration</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.TestManagement.Client</AssemblyReference>
      <AssemblyReference>Microsoft.TeamFoundation.VersionControl.Client</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ComponentModel.Composition</AssemblyReference>
      <AssemblyReference>PresentationFramework</AssemblyReference>
      <AssemblyReference>WindowsBase</AssemblyReference>
      <AssemblyReference>PresentationCore</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>HybridLab.Virtual.UnitTests</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Sequence DisplayName="Application Deployment Workflow" sap2010:WorkflowViewState.IdRef="Sequence_6" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
    <Sequence.Variables>
      <Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
      <Variable x:TypeArguments="x:String" Name="LabEnvironmentUri" />
      <Variable x:TypeArguments="x:String" Name="BuildLocation" />
      <Variable x:TypeArguments="x:Int64" Name="SnapshotId" />
      <Variable x:TypeArguments="x:Int32" Name="QueueBuildId" />
      <Variable x:TypeArguments="mtbc:BuildStatus" Default="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded]" Name="BuildStatus" />
      <Variable x:TypeArguments="mtbc:IBuildDetail" Name="ChildBuildDetail" />
      <Variable x:TypeArguments="mtbc:IBuildDetail" Name="SelectedBuildDetail" />
      <Variable x:TypeArguments="x:String" Name="BuildNumber" />
      <Variable x:TypeArguments="mtlc:LabEnvironment" Name="LabEnvironment" />
    </Sequence.Variables>
    <mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" sap2010:WorkflowViewState.IdRef="UpdateBuildNumber_1" />
    <mtbwa:GetBuildDetail DisplayName="Get Build Details" sap2010:WorkflowViewState.IdRef="GetBuildDetail_1" Result="[BuildDetail]" />
    <If Condition="[LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True AndAlso LabWorkflowParameters.BuildDetails.QueueNewBuild = True]" DisplayName="If Build is needed" sap2010:WorkflowViewState.IdRef="If_1">
      <If.Then>
        <Sequence DisplayName="Do Build" sap2010:WorkflowViewState.IdRef="Sequence_1">
          <mtlwa:RunWorkflow BuildController="{x:Null}" LabEnvironmentUri="{x:Null}" BuildDefinition="[LabWorkflowParameters.BuildDetails.BuildDefinitionName]" DisplayName="Start Build Workflow" sap2010:WorkflowViewState.IdRef="RunWorkflow_1" ProjectName="[BuildDetail.TeamProject]" Result="[QueueBuildId]" />
          <mtlwa:WaitForWorkflow AllowPartiallySucceededBuild="True" BuildDetails="[ChildBuildDetail]" DisplayName="Wait For Build To Complete" sap2010:WorkflowViewState.IdRef="WaitForWorkflow_1" LabWorkflowType="[Microsoft.TeamFoundation.Lab.Workflow.Activities.WorkflowType.Build]" MaxConsecutiveFailuresToIgnoreDuringWaitForCompletion="[3]" MaxWaitTime="[TimeSpan.Zero]" QueueBuildId="[QueueBuildId]" RefreshInterval="[System.TimeSpan.FromMinutes(1)]" Result="[BuildStatus]" ThrowOnError="True" />
          <Assign DisplayName="Set Build Location" sap2010:WorkflowViewState.IdRef="Assign_1">
            <Assign.To>
              <OutArgument x:TypeArguments="x:Uri">[LabWorkflowParameters.BuildDetails.BuildUri]</OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="x:Uri">[ChildBuildDetail.Uri]</InArgument>
            </Assign.Value>
          </Assign>
        </Sequence>
      </If.Then>
    </If>
    <mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Update Deployment Summary" sap2010:WorkflowViewState.IdRef="WriteDeploymentInformation_1" Message="[String.Format(&quot;Lab environment: {0}&quot;, LabWorkflowParameters.HybridLab.LabEnvironment.LabEnvironmentName)]" />
    <mtlwa:GetBuildLocationAndBuildNumber BuildDetails="[LabWorkflowParameters.BuildDetails]" BuildNumber="[BuildNumber]" DisplayName="Get Build Location And Build Number" sap2010:WorkflowViewState.IdRef="GetBuildLocationAndBuildNumber_1" Result="[BuildLocation]" SelectedBuild="[SelectedBuildDetail]" />
    <If Condition="[LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True]" DisplayName="Compute build location needed" sap2010:WorkflowViewState.IdRef="If_2">
      <If.Then>
        <Assign DisplayName="Compute build path" sap2010:WorkflowViewState.IdRef="Assign_2">
          <Assign.To>
            <OutArgument x:TypeArguments="x:String">[BuildLocation]</OutArgument>
          </Assign.To>
          <Assign.Value>
            <InArgument x:TypeArguments="x:String">[If(LabWorkflowParameters.BuildDetails.Configuration Is Nothing, BuildLocation, If(LabWorkflowParameters.BuildDetails.Configuration.IsEmpty Or (SelectedBuildDetail.Information.GetNodesByType(Microsoft.TeamFoundation.Build.Common.InformationTypes.ConfigurationSummary, True)).Count = 1, BuildLocation, If(LabWorkflowParameters.BuildDetails.Configuration.IsPlatformEmptyOrAnyCpu, BuildLocation + "\" + LabWorkflowParameters.BuildDetails.Configuration.Configuration, BuildLocation + "\" + LabWorkflowParameters.BuildDetails.Configuration.Platform + "\" + LabWorkflowParameters.BuildDetails.Configuration.Configuration)))]</InArgument>
          </Assign.Value>
        </Assign>
      </If.Then>
    </If>
    <If Condition="[LabWorkflowParameters.HybridLab.LabEnvironment.Disposition = Microsoft.TeamFoundation.Lab.Client.LabEnvironmentDisposition.Stored]" DisplayName="If user selected stored environment" sap2010:WorkflowViewState.IdRef="If_3">
      <If.Then>
        <Throw DisplayName="Indicate error" Exception="[New System.Exception(&quot;You have selected an environment that is stored in the library. Select an environment that is deployed on a team project host group.&quot;)]" sap2010:WorkflowViewState.IdRef="Throw_1" />
      </If.Then>
    </If>
    <Assign DisplayName="Get Lab Environment Uri" sap2010:WorkflowViewState.IdRef="Assign_3">
      <Assign.To>
        <OutArgument x:TypeArguments="x:String">[LabEnvironmentUri]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="x:String">[LabWorkflowParameters.HybridLab.LabEnvironment.LabEnvironmentUri.ToString()]</InArgument>
      </Assign.Value>
    </Assign>
    <mtlwa:GetLabEnvironment DisplayName="Get Lab Environment" sap2010:WorkflowViewState.IdRef="GetLabEnvironment_1" LabEnvironmentUri="[LabEnvironmentUri]" Result="[LabEnvironment]" />
    <If Condition="[LabWorkflowParameters.HybridLab.RevertToSnapshot = True]" DisplayName=" If Restore Snapshot" sap2010:WorkflowViewState.IdRef="If_4">
      <If.Then>
        <Sequence DisplayName="Restore Snapshot" sap2010:WorkflowViewState.IdRef="Sequence_2">
          <hwac:RestoreHybridLabEnvironmentSnapshots DisplayName="Restoring Hybrid Lab VM Snapshots" sap2010:ExpressionActivityEditor.ExpressionActivityEditor="C#" HybridLabEnvironment="[LabWorkflowParameters.HybridLab]" sap2010:WorkflowViewState.IdRef="HybridLab.Workflow.Activities.CustomActivities.RestoreHybridLabEnvironmentSnapshots_1">
            <sap2010:WorkflowViewState.ViewStateManager>
              <sap2010:ViewStateManager>
                <sap2010:ViewStateData Id="GetHybridLabVirtualHost_1" sap2010:WorkflowViewState.IdRef="ViewStateData_1" />
                <sap2010:ViewStateData Id="Assign_1" sap2010:WorkflowViewState.IdRef="ViewStateData_2" />
                <sap2010:ViewStateData Id="RestoreVMSnapshotActivity_1" sap2010:WorkflowViewState.IdRef="ViewStateData_3" />
                <sap2010:ViewStateData Id="WriteBuildMessage_1" sap2010:WorkflowViewState.IdRef="ViewStateData_4" />
                <sap2010:ViewStateData Id="If_1" sap2010:WorkflowViewState.IdRef="ViewStateData_5" />
                <sap2010:ViewStateData Id="Sequence_2" sap2010:WorkflowViewState.IdRef="ViewStateData_6" />
                <sap2010:ViewStateData Id="ParallelForEach`1_1" sap2010:WorkflowViewState.IdRef="ViewStateData_7" />
                <sap2010:ViewStateData Id="Sequence_1" sap2010:WorkflowViewState.IdRef="ViewStateData_8" />
                <sap2010:ViewStateData Id="HybridLab.Workflow.Activities.CustomActivities.RestoreHybridLabEnvironmentSnapshots_1" sap2010:WorkflowViewState.IdRef="ViewStateData_9" />
              </sap2010:ViewStateManager>
            </sap2010:WorkflowViewState.ViewStateManager>
          </hwac:RestoreHybridLabEnvironmentSnapshots>
          <Delay DisplayName="Pause for 1min to allow machine to come up on network" Duration="[TimeSpan.FromMinutes(1)]" sap2010:WorkflowViewState.IdRef="Delay_1" />
          <Sequence DisplayName="Restart Interactive Agent" sap2010:WorkflowViewState.IdRef="Sequence_12">
            <Sequence.Variables>
              <Variable x:TypeArguments="mtlc:LabSystem" Name="interactiveMachine" />
              <Variable x:TypeArguments="x:String" Name="interactiveUser" />
            </Sequence.Variables>
            <Assign sap2010:WorkflowViewState.IdRef="Assign_7">
              <Assign.To>
                <OutArgument x:TypeArguments="mtlc:LabSystem">[interactiveMachine]</OutArgument>
              </Assign.To>
              <Assign.Value>
                <InArgument x:TypeArguments="mtlc:LabSystem">[LabEnvironment.LabSystems.SingleOrDefault(Function(m) m.Roles = LabEnvironment.CodedUIRole)]</InArgument>
              </Assign.Value>
            </Assign>
            <If Condition="[interactiveMachine IsNot Nothing And Not String.IsNullOrEmpty(LabWorkflowParameters.HybridLab.InteractiveUserPassword)]" DisplayName="If there is an interactive machine and we have the password" sap2010:WorkflowViewState.IdRef="If_14">
              <If.Then>
                <Sequence sap2010:WorkflowViewState.IdRef="Sequence_11">
                  <Sequence.Variables>
                    <Variable x:TypeArguments="x:String" Name="psPath" />
                  </Sequence.Variables>
                  <Assign DisplayName="Get the Interactive username" sap2010:WorkflowViewState.IdRef="Assign_9">
                    <Assign.To>
                      <OutArgument x:TypeArguments="x:String">[interactiveUser]</OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="x:String">[LabEnvironment.CodedUIUserName.Replace(".\", "")]</InArgument>
                    </Assign.Value>
                  </Assign>
                  <Assign DisplayName="Get the Path to PsKill and PsExec" sap2010:WorkflowViewState.IdRef="Assign_8">
                    <Assign.To>
                      <OutArgument x:TypeArguments="x:String">[psPath]</OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="x:String">[System.IO.Directory.GetParent(LabWorkflowParameters.GetType().Assembly.Location).FullName]</InArgument>
                    </Assign.Value>
                  </Assign>
                  <mtbwa:InvokeProcess Arguments="[String.Format(&quot;-t \\{0} -u {1} -p {2} QTAgentProcessUI.exe&quot;, interactiveMachine.Name, interactiveUser, LabWorkflowParameters.HybridLab.InteractiveUserPassword)]" DisplayName="Kill the Agent Process" FileName="[Path.Combine(psPath, &quot;psKill.exe&quot;)]" sap2010:WorkflowViewState.IdRef="InvokeProcess_1">
                    <mtbwa:InvokeProcess.ErrorDataReceived>
                      <ActivityAction x:TypeArguments="x:String">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
                        </ActivityAction.Argument>
                        <mtbwa:WriteBuildMessage sap2010:WorkflowViewState.IdRef="WriteBuildMessage_3" Message="[errOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                      </ActivityAction>
                    </mtbwa:InvokeProcess.ErrorDataReceived>
                    <mtbwa:InvokeProcess.OutputDataReceived>
                      <ActivityAction x:TypeArguments="x:String">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" />
                        </ActivityAction.Argument>
                        <mtbwa:WriteBuildMessage sap2010:WorkflowViewState.IdRef="WriteBuildMessage_1" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                      </ActivityAction>
                    </mtbwa:InvokeProcess.OutputDataReceived>
                  </mtbwa:InvokeProcess>
                  <mtbwa:InvokeProcess Arguments="[String.Format(&quot;\\{0} -i -d -h -u {1} -p {2} &quot;&quot;c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\QTAgentProcessUI.exe&quot;&quot;&quot;, interactiveMachine.Name, interactiveUser, LabWorkflowParameters.HybridLab.InteractiveUserPassword)]" DisplayName="Start the Agent Process" FileName="[Path.Combine(psPath, &quot;psExec.exe&quot;)]" sap2010:WorkflowViewState.IdRef="InvokeProcess_2" WorkingDirectory="[psPath]">
                    <mtbwa:InvokeProcess.ErrorDataReceived>
                      <ActivityAction x:TypeArguments="x:String">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="x:String" Name="errOutput" />
                        </ActivityAction.Argument>
                        <mtbwa:WriteBuildMessage sap2010:WorkflowViewState.IdRef="WriteBuildMessage_4" Message="[errOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                      </ActivityAction>
                    </mtbwa:InvokeProcess.ErrorDataReceived>
                    <mtbwa:InvokeProcess.OutputDataReceived>
                      <ActivityAction x:TypeArguments="x:String">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" />
                        </ActivityAction.Argument>
                        <mtbwa:WriteBuildMessage sap2010:WorkflowViewState.IdRef="WriteBuildMessage_2" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                      </ActivityAction>
                    </mtbwa:InvokeProcess.OutputDataReceived>
                  </mtbwa:InvokeProcess>
                </Sequence>
              </If.Then>
            </If>
          </Sequence>
          <hwac1:RepairLabEnvironmentActivity DisplayName="Repair Lab Environment" sap2010:WorkflowViewState.IdRef="RepairLabEnvironmentActivity_1" LabEnvironmentUri="[LabEnvironmentUri]" />
        </Sequence>
      </If.Then>
      <If.Else>
        <Sequence DisplayName="No Clean Snapshot" sap2010:WorkflowViewState.IdRef="Sequence_7">
          <If Condition="[Not String.Equals(Microsoft.TeamFoundation.Lab.Client.LabEnvironment.UnmanagedProvider, labEnvironment.LabProvider)]" DisplayName="If Virtual Environment" sap2010:WorkflowViewState.IdRef="If_12">
            <If.Then>
              <mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Clean snapshot not specified " sap2010:WorkflowViewState.IdRef="WriteDeploymentInformation_2" Message="Build definition did not specify a clean snapshot. It is a best practice to use clean snapshot when running the lab workflow." />
            </If.Then>
          </If>
        </Sequence>
      </If.Else>
    </If>
    <If Condition="[LabWorkflowParameters.DeploymentDetails.DeploymentNeeded = True Or LabWorkflowParameters.TestParameters.RunTest = True]" DisplayName="If deployment or test needed" sap2010:WorkflowViewState.IdRef="If_5">
      <If.Then>
        <Sequence sap2010:WorkflowViewState.IdRef="Sequence_10">
          <mtlwa:WaitForEnvironmentReady DisplayName="Wait For Environment To Be Ready" sap2010:WorkflowViewState.IdRef="WaitForEnvironmentReady_1" LabEnvironmentUri="[LabEnvironmentUri]" MaxWaitTime="[System.TimeSpan.FromMinutes(20)]" />
        </Sequence>
      </If.Then>
    </If>
    <If Condition="[LabWorkflowParameters.DeploymentDetails.DeploymentNeeded = True]" DisplayName="If deployment needed" sap2010:WorkflowViewState.IdRef="If_8">
      <If.Then>
        <Sequence DisplayName="Do deployment" sap2010:WorkflowViewState.IdRef="Sequence_4">
          <mtlwa:ReserveEnvironmentForDeployment DisplayName="Reserve Environment For Deployment" sap2010:WorkflowViewState.IdRef="ReserveEnvironmentForDeployment_1" LabEnvironmentUri="[LabEnvironmentUri]" />
          <TryCatch DisplayName="Deploy Build on Environment" sap2010:WorkflowViewState.IdRef="TryCatch_1">
            <TryCatch.Finally>
              <mtlwa:ReleaseEnvironmentFromDeployment DisplayName="Release Environment From Deployment" sap2010:WorkflowViewState.IdRef="ReleaseEnvironmentFromDeployment_1" LabEnvironmentUri="[LabEnvironmentUri]" />
            </TryCatch.Finally>
            <TryCatch.Try>
              <Sequence DisplayName="Deploying Build" sap2010:WorkflowViewState.IdRef="Sequence_8">
                <ForEach x:TypeArguments="x:String" DisplayName="Run Deployment scripts" sap2010:WorkflowViewState.IdRef="ForEach`1_1" Values="[LabWorkflowParameters.DeploymentDetails.Scripts]">
                  <ActivityAction x:TypeArguments="x:String">
                    <ActivityAction.Argument>
                      <DelegateInArgument x:TypeArguments="x:String" Name="deploymentConfigurationPair" />
                    </ActivityAction.Argument>
                    <mtlwa:RunDeploymentTask BuildLocation="[BuildLocation]" DeploymentScriptDetails="[deploymentConfigurationPair]" DisplayName="Run Deployment Task" sap2010:WorkflowViewState.IdRef="RunDeploymentTask_1" LabEnvironmentUri="[LabEnvironmentUri]" MaxWaitTime="[TimeSpan.FromMinutes(TimeoutForDeploymentScriptInMinutes)]" ThrowOnError="True" UseRoleForDeployment="[LabWorkflowParameters.DeploymentDetails.UseRoleForDeployment]" />
                  </ActivityAction>
                </ForEach>
              </Sequence>
            </TryCatch.Try>
          </TryCatch>
          <mtlwa:WriteDeploymentInformation DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Application Deployment Succeeded" sap2010:WorkflowViewState.IdRef="WriteDeploymentInformation_3" Message="[String.Format(&quot;The application was deployed successfully from the following build location:&quot;)]" Url="[BuildLocation]" />
          <If Condition="[LabWorkflowParameters.DeploymentDetails.TakePostDeploymentSnapshot = True]" DisplayName="Post Deployment Snapshot" sap2010:WorkflowViewState.IdRef="If_7">
            <If.Then>
              <Sequence DisplayName="Take Post deployment Snapshot " sap2010:WorkflowViewState.IdRef="Sequence_3">
                <Sequence.Variables>
                  <Variable x:TypeArguments="x:Int64" Name="PostDeploymentSnapshotChainId" />
                  <Variable x:TypeArguments="x:String" Default="[String.Format(&quot;{0}_{1}&quot;, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" Name="PostDeploymentSnapshotName" />
                </Sequence.Variables>
                <If Condition="[String.IsNullOrEmpty(LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName) = False]" DisplayName="Check snapshot name" sap2010:WorkflowViewState.IdRef="If_6">
                  <If.Then>
                    <Assign sap2010:WorkflowViewState.IdRef="Assign_4">
                      <Assign.To>
                        <OutArgument x:TypeArguments="x:String">[PostDeploymentSnapshotName]</OutArgument>
                      </Assign.To>
                      <Assign.Value>
                        <InArgument x:TypeArguments="x:String">[If(LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True, String.Format("{0}_{1}_{2}", LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName, BuildNumber, BuildDetail.BuildNumber), String.Format("{0}_{1}", LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName, BuildDetail.BuildNumber))]</InArgument>
                      </Assign.Value>
                    </Assign>
                  </If.Then>
                </If>
                <hwac:CreateHybridLabEnvironmentSnapshots DisplayName="Creating Hybrid Lab Snapshots on VMs" sap2010:ExpressionActivityEditor.ExpressionActivityEditor="C#" HybridLabEnvironment="[LabWorkflowParameters.HybridLab]" sap2010:WorkflowViewState.IdRef="HybridLab.Workflow.Activities.CustomActivities.CreateHybridLabEnvironmentSnapshots" SnapshotPrefix="[PostDeploymentSnapshotName]">
                  <sap2010:WorkflowViewState.ViewStateManager>
                    <sap2010:ViewStateManager>
                      <sap2010:ViewStateData Id="GetHybridLabVirtualHost_1" sap2010:WorkflowViewState.IdRef="ViewStateData_10" />
                      <sap2010:ViewStateData Id="Assign_1" sap2010:WorkflowViewState.IdRef="ViewStateData_11" />
                      <sap2010:ViewStateData Id="CreateVMSnapshotActivity_1" sap2010:WorkflowViewState.IdRef="ViewStateData_12" />
                      <sap2010:ViewStateData Id="If_1" sap2010:WorkflowViewState.IdRef="ViewStateData_13" />
                      <sap2010:ViewStateData Id="Sequence_2" sap2010:WorkflowViewState.IdRef="ViewStateData_14" />
                      <sap2010:ViewStateData Id="ParallelForEach`1_1" sap2010:WorkflowViewState.IdRef="ViewStateData_15" />
                      <sap2010:ViewStateData Id="Sequence_1" sap2010:WorkflowViewState.IdRef="ViewStateData_16" />
                      <sap2010:ViewStateData Id="HybridLab.Workflow.Activities.CustomActivities.CreateHybridLabEnvironmentSnapshots" sap2010:WorkflowViewState.IdRef="ViewStateData_17" />
                    </sap2010:ViewStateManager>
                  </sap2010:WorkflowViewState.ViewStateManager>
                </hwac:CreateHybridLabEnvironmentSnapshots>
                <mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Taking Snapshot succeeded" sap2010:WorkflowViewState.IdRef="WriteDeploymentInformation_4" Message="[String.Format(&quot;The following snapshot name was used on the VMs after the deployment was finished: {0}&quot;, PostDeploymentSnapshotName)]" />
              </Sequence>
            </If.Then>
            <If.Else>
              <Sequence DisplayName="No Post Deployment Snapshot" sap2010:WorkflowViewState.IdRef="Sequence_9">
                <If Condition="[Not String.Equals(Microsoft.TeamFoundation.Lab.Client.LabEnvironment.UnmanagedProvider, labEnvironment.LabProvider)]" DisplayName="If Virtual Environment" sap2010:WorkflowViewState.IdRef="If_13">
                  <If.Then>
                    <mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="[Microsoft.TeamFoundation.Build.Common.DeploymentInformationTypes.Deploy]" DisplayName="Post deployment snapshot not specified" sap2010:WorkflowViewState.IdRef="WriteDeploymentInformation_6" Message="Build definition did not specify a post deployment snapshot. It is a best practice to take post deployment snapshot when running the lab workflow." />
                  </If.Then>
                </If>
              </Sequence>
            </If.Else>
          </If>
        </Sequence>
      </If.Then>
    </If>
    <If Condition="[LabWorkflowParameters.TestParameters.RunTest = True]" DisplayName="Run Tests on Environment" sap2010:WorkflowViewState.IdRef="If_11">
      <If.Then>
        <Sequence DisplayName="Run Tests" sap2010:WorkflowViewState.IdRef="Sequence_5">
          <Sequence.Variables>
            <Variable x:TypeArguments="mtltc:TestingCapabilityInformation" Name="TestCapabilityInfo" />
            <Variable x:TypeArguments="x:String" Name="variable1" />
            <Variable x:TypeArguments="mtlwa:TestRunStatistics" Default="[New Microsoft.TeamFoundation.Lab.Workflow.Activities.TestRunStatistics()]" Name="TestResults" />
          </Sequence.Variables>
          <mtlwa:ExecuteRemoteTestRun2 MaxWaitTime="{x:Null}" TestEnvironment="{x:Null}" BuildDefinitionName="[LabWorkflowParameters.BuildDetails.BuildDefinitionName]" BuildNumber="[BuildNumber]" DisplayName="Running Tests" sap2010:WorkflowViewState.IdRef="ExecuteRemoteTestRun2_1" LabEnvironmentUri="[LabEnvironmentUri]" MaxConsecutiveFailuresToIgnoreDuringWaitForCompletion="[3]" RefreshInterval="[System.TimeSpan.FromMinutes(1)]" Result="[TestResults]" TestDirectory="[BuildLocation]" TestParameters="[LabWorkflowParameters.TestParameters]" Title="[String.Format(&quot;{0}&quot;, BuildDetail.BuildNumber)]" />
          <If Condition="[TestResults.PassedTests &lt;&gt; TestResults.TotalTests Or TestResults.TestRunStatus &lt;&gt; TestManagement.Client.TestRunState.Completed]" DisplayName="If all tests have not passed" sap2010:WorkflowViewState.IdRef="If_10">
            <If.Then>
              <If Condition="[(LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True AndAlso LabWorkflowParameters.BuildDetails.QueueNewBuild = True) Or (LabWorkflowParameters.DeploymentDetails.DeploymentNeeded = True)]" DisplayName="Set build status" sap2010:WorkflowViewState.IdRef="If_9">
                <If.Then>
                  <Assign DisplayName="Partially succeeded" sap2010:WorkflowViewState.IdRef="Assign_5">
                    <Assign.To>
                      <OutArgument x:TypeArguments="mtbc:BuildStatus">[BuildStatus]</OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="mtbc:BuildStatus">[Microsoft.TeamFoundation.Build.Client.BuildStatus.PartiallySucceeded]</InArgument>
                    </Assign.Value>
                  </Assign>
                </If.Then>
                <If.Else>
                  <Assign DisplayName="Failed" sap2010:WorkflowViewState.IdRef="Assign_6">
                    <Assign.To>
                      <OutArgument x:TypeArguments="mtbc:BuildStatus">[BuildStatus]</OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="mtbc:BuildStatus">[Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed]</InArgument>
                    </Assign.Value>
                  </Assign>
                </If.Else>
              </If>
            </If.Then>
          </If>
        </Sequence>
      </If.Then>
    </If>
    <mtbwa:SetBuildProperties DisplayName="Set build status" sap2010:WorkflowViewState.IdRef="SetBuildProperties_1" PropertiesToSet="Status" Status="[BuildStatus]" />
    <sads:DebugSymbol.Symbol>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</sads:DebugSymbol.Symbol>
  </Sequence>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="UpdateBuildNumber_1" sap:VirtualizedContainerService.HintSize="1144,22" />
      <sap2010:ViewStateData Id="GetBuildDetail_1" sap:VirtualizedContainerService.HintSize="1144,22" />
      <sap2010:ViewStateData Id="RunWorkflow_1" sap:VirtualizedContainerService.HintSize="242,22" />
      <sap2010:ViewStateData Id="WaitForWorkflow_1" sap:VirtualizedContainerService.HintSize="242,22" />
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="264,308">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="1144,456" />
      <sap2010:ViewStateData Id="WriteDeploymentInformation_1" sap:VirtualizedContainerService.HintSize="1144,22" />
      <sap2010:ViewStateData Id="GetBuildLocationAndBuildNumber_1" sap:VirtualizedContainerService.HintSize="1144,22" />
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="If_2" sap:VirtualizedContainerService.HintSize="1144,208" />
      <sap2010:ViewStateData Id="Throw_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_3" sap:VirtualizedContainerService.HintSize="1144,208" />
      <sap2010:ViewStateData Id="Assign_3" sap:VirtualizedContainerService.HintSize="1144,60" />
      <sap2010:ViewStateData Id="GetLabEnvironment_1" sap:VirtualizedContainerService.HintSize="1144,22" />
      <sap2010:ViewStateData Id="ViewStateData_1" sap:VirtualizedContainerService.HintSize="516,22" />
      <sap2010:ViewStateData Id="ViewStateData_2" sap:VirtualizedContainerService.HintSize="464,62" />
      <sap2010:ViewStateData Id="ViewStateData_3" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="ViewStateData_4" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="ViewStateData_5" sap:VirtualizedContainerService.HintSize="464,210">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ViewStateData_6" sap:VirtualizedContainerService.HintSize="486,436">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ViewStateData_7" sap:VirtualizedContainerService.HintSize="516,586" />
      <sap2010:ViewStateData Id="ViewStateData_8" sap:VirtualizedContainerService.HintSize="538,772">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ViewStateData_9" sap:VirtualizedContainerService.HintSize="578,852" />
      <sap2010:ViewStateData Id="HybridLab.Workflow.Activities.CustomActivities.RestoreHybridLabEnvironmentSnapshots_1" sap:VirtualizedContainerService.HintSize="486,22" />
      <sap2010:ViewStateData Id="Delay_1" sap:VirtualizedContainerService.HintSize="486,22" />
      <sap2010:ViewStateData Id="Assign_7" sap:VirtualizedContainerService.HintSize="464,60" />
      <sap2010:ViewStateData Id="Assign_9" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="Assign_8" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="WriteBuildMessage_3" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="WriteBuildMessage_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="InvokeProcess_1" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="WriteBuildMessage_4" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="WriteBuildMessage_2" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="InvokeProcess_2" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_11" sap:VirtualizedContainerService.HintSize="264,466">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_14" sap:VirtualizedContainerService.HintSize="464,614" />
      <sap2010:ViewStateData Id="Sequence_12" sap:VirtualizedContainerService.HintSize="486,838">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="RepairLabEnvironmentActivity_1" sap:VirtualizedContainerService.HintSize="486,22" />
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="508,1330">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="WriteDeploymentInformation_2" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_12" sap:VirtualizedContainerService.HintSize="464,208" />
      <sap2010:ViewStateData Id="Sequence_7" sap:VirtualizedContainerService.HintSize="486,332">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_4" sap:VirtualizedContainerService.HintSize="1144,1478" />
      <sap2010:ViewStateData Id="WaitForEnvironmentReady_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Sequence_10" sap:VirtualizedContainerService.HintSize="222,146">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_5" sap:VirtualizedContainerService.HintSize="1144,294" />
      <sap2010:ViewStateData Id="ReserveEnvironmentForDeployment_1" sap:VirtualizedContainerService.HintSize="997,22" />
      <sap2010:ViewStateData Id="ReleaseEnvironmentFromDeployment_1" sap:VirtualizedContainerService.HintSize="711,22" />
      <sap2010:ViewStateData Id="RunDeploymentTask_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="ForEach`1_1" sap:VirtualizedContainerService.HintSize="287,208" />
      <sap2010:ViewStateData Id="Sequence_8" sap:VirtualizedContainerService.HintSize="309,332">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TryCatch_1" sap:VirtualizedContainerService.HintSize="997,537" />
      <sap2010:ViewStateData Id="WriteDeploymentInformation_3" sap:VirtualizedContainerService.HintSize="997,22" />
      <sap2010:ViewStateData Id="Assign_4" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="If_6" sap:VirtualizedContainerService.HintSize="464,208" />
      <sap2010:ViewStateData Id="ViewStateData_10" sap:VirtualizedContainerService.HintSize="516,22" />
      <sap2010:ViewStateData Id="ViewStateData_11" sap:VirtualizedContainerService.HintSize="464,62" />
      <sap2010:ViewStateData Id="ViewStateData_12" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="ViewStateData_13" sap:VirtualizedContainerService.HintSize="464,210" />
      <sap2010:ViewStateData Id="ViewStateData_14" sap:VirtualizedContainerService.HintSize="486,436">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ViewStateData_15" sap:VirtualizedContainerService.HintSize="516,586" />
      <sap2010:ViewStateData Id="ViewStateData_16" sap:VirtualizedContainerService.HintSize="538,772">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ViewStateData_17" sap:VirtualizedContainerService.HintSize="578,852" />
      <sap2010:ViewStateData Id="HybridLab.Workflow.Activities.CustomActivities.CreateHybridLabEnvironmentSnapshots" sap:VirtualizedContainerService.HintSize="464,22" />
      <sap2010:ViewStateData Id="WriteDeploymentInformation_4" sap:VirtualizedContainerService.HintSize="464,22" />
      <sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="486,456">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="WriteDeploymentInformation_6" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_13" sap:VirtualizedContainerService.HintSize="464,208" />
      <sap2010:ViewStateData Id="Sequence_9" sap:VirtualizedContainerService.HintSize="486,332">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_7" sap:VirtualizedContainerService.HintSize="997,604" />
      <sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="1019,1429">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_8" sap:VirtualizedContainerService.HintSize="1144,1577" />
      <sap2010:ViewStateData Id="ExecuteRemoteTestRun2_1" sap:VirtualizedContainerService.HintSize="634,22" />
      <sap2010:ViewStateData Id="Assign_5" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="Assign_6" sap:VirtualizedContainerService.HintSize="242,60" />
      <sap2010:ViewStateData Id="If_9" sap:VirtualizedContainerService.HintSize="509,208" />
      <sap2010:ViewStateData Id="If_10" sap:VirtualizedContainerService.HintSize="634,356" />
      <sap2010:ViewStateData Id="Sequence_5" sap:VirtualizedContainerService.HintSize="656,542">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_11" sap:VirtualizedContainerService.HintSize="1144,690" />
      <sap2010:ViewStateData Id="SetBuildProperties_1" sap:VirtualizedContainerService.HintSize="1144,22" />
      <sap2010:ViewStateData Id="Sequence_6" sap:VirtualizedContainerService.HintSize="1166,5747">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TfsBuild.Process_1" sap:VirtualizedContainerService.HintSize="1206,5827" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>